import { createRouter, createWebHistory } from "vue-router";

const routes = [
  {
    path: "/",
    redirect: "/LoginLayout",
  },
  {
    path: "/LoginLayout",
    component: () => import("@/views/LoginLayout.vue"), // 你的登录页组件路径
    redirect: "/LoginLayout/login",
    children: [
      {
        path: "/LoginLayout/login",
        component: () => import('@/views/layout/userManage/login.vue'),
      },
      {
        path: "/LoginLayout/register",
        component: () => import('@/views/layout/userManage/Register.vue'),
      },
      {
        path: "/LoginLayout/password-reset",
        component: () => import('@/views/layout/userManage/PasswordReset.vue'),
      },
    ],
  },
  {
    path: "/layout",
    component: () => import("@/views/layout/Layout.vue"),
    redirect: "/layout/Generate3D",
    children: [
      {
        path: "/layout/Generate3D",
        component: () => import("@/views/layout/Generate3D/Generate3D.vue"), // 你的主页组件路径
      },
    ],
  },
];

// const router = createRouter({
//   history: createWebHistory(import.meta.env.BASE_URL),
//   routes,
// });
const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
